package inits

import (
	"github.com/go-redis/redis/v8"
	"log"
	"zg6/o2-o-takeaway-backend-system/common/global"
)

func ExampleClient() {
	redisConfig := global.AppConfig.Redis
	global.RDB = redis.NewClient(&redis.Options{
		Addr:     redisConfig.Addr,
		Password: redisConfig.Password, // no password set
		DB:       redisConfig.Db,       // use default DB
	})
	log.Println("redis init success")
}
